﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class RD : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
      this.TextBox2.Text=Session["username"].ToString();
        }
    }

   
    protected void Button1_Click(object sender, EventArgs e)
    {
        string sql;
        sql = "insert into 供应商服务(标题,发布人,内容) values('" + this.TextBox1.Text.Trim() + "','" + this.TextBox2.Text + "','" + this.WebEditor1.Text + "')";
        int result;
        result = new Class1().hsgexucute(sql);
        if (result == 1)
        {
            Response.Write("<script>javascript:alert('添加成功');</script>");
        }
        else
        {
            Response.Write("<script>javascript:alert('系统错误，您没有设置好数据库的连接！');</script>");
        }
    }
   
   
}
